home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / -archivi / -recent2 / ged_scripts.lha / GED_Scripts / Reference.rexx < prev   
OS/2 REXX Batch file  |  1999-01-11  |  1KB  |  51 lines

  1. /* $VER: Reference.rexx 1.0 (29.12.98)          */
  2. /* Freeware, ©1998 Christian Hattemer           */
  3. /* email: Chris@mail.riednet.wh.tu-darmstadt.de */
  4. /*                                              */
  5. /* Calls GoldED's XREF Function with the word   */
  6. /* under the Cursor. If nothing is found it     */
  7. /* tries again with an A appended to the end of */
  8. /* the search word.                             */
  9.  
  10. options results                             /* enable return codes     */
  11.  
  12. if (left(address(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  13.  
  14.     address 'GOLDED.1'
  15.  
  16. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  17.  
  18. if (RC ~= 0) then
  19.  
  20.     exit
  21.  
  22. options failat 6                            /* ignore warnings         */
  23.  
  24. signal on syntax                            /* ensure clean exit       */
  25.  
  26. /* ---------------------- INSERT YOUR CODE HERE ---------------------- */
  27.  
  28. 'SET NAME=HIDE VALUE=TRUE'
  29.  
  30. 'XREF CURRENT PROTECT'
  31.  
  32. if (RC ~= 0) then do
  33.    'QUERY WORD VAR=Searchword'
  34.    Searchword = Searchword||"A"
  35.    'XREF PHRASE="'Searchword'" PROTECT'
  36. end
  37.  
  38. 'SET NAME=HIDE VALUE=FALSE'
  39.  
  40. /* ------------------------- END OF YOUR CODE ------------------------ */
  41.  
  42. 'UNLOCK'                                    /* unlock GUI              */
  43.  
  44. exit
  45.  
  46. SYNTAX:
  47.  
  48. SAY "Error in line" SIGL ":" ERRORTEXT(RC)
  49.  
  50. 'UNLOCK'
  51.